Passed
Push — master ( 52f960...2ac20a )
by Javier
02:29
created

voting_url.js ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 3
Bugs 0 Features 0
Metric Value
cc 1
c 3
b 0
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
1
class VotingUrl {
2
  constructor (baseUrl, votingPoll) {
3
    this.votingPoll = votingPoll
4
    this.baseUrl = baseUrl
5
  }
6
7
  value () {
8
    return `${this.baseUrl}/voting/${this.votingPoll.id}`
9
  }
10
11
  equalsTo (other) {
12
    return other instanceof VotingUrl && this.value() === other.value()
13
  }
14
}
15
16
export default VotingUrl
17